import request from '@/utils/request'

export function getCategories(params) {
  return request({
    url: '/admin/categories',
    method: 'get',
    params
  })
}

export function createCategories(params) {
  return request({
    url: '/admin/categories',
    method: 'post',
    data: params
  })
}

export function updateCategories(params) {
  return request({
    url: '/admin/categories',
    method: 'put',
    data: params
  })
}

export function deleteCategories(params) {
  return request({
    url: '/admin/categories',
    method: 'delete',
    data: params
  })
}

export function batchDeleteCategories(params) {
  return request({
    url: '/admin/categories/all',
    method: 'delete',
    data: params
  })
}

